﻿@model System.Web.Security.MembershipUser

@{   
    ViewBag.Title = "SGC - Editar Usuario";
}

<div style="width:100%; float:left">
    <h3 style="float:left">Editar Usuario</h3>
    <div style="float:right">
    @Html.ActionLink("Inicio", "Index", "Home")
    @Html.ActionLink("Volver", "Index")</div>
</div>

    @Html.ValidationSummary("No se pudo guardar. Por favor corrija los errores y trate de nuevo.")
    @using (Html.BeginForm())
       {
    <table style="width:70%; margin-left:15%; margin-right:15%; border-style: none">
        <tr>
            <td style="vertical-align: top; border-style: none">
                <fieldset>
                    <legend>Información de Usuario</legend>
                    <p>
                        <label for="username">Username:</label>
                        @Html.TextBox("username", Model.UserName)
                    </p>
                    <p>
                        <label for="email">Email:</label>
                        @Html.TextBox("email", Model.Email)
                    </p>
                    <p>
                        <label for="comment">Comentario:</label>
                        @Html.TextBox("comment", Model.Comment)
                    </p>
                </fieldset>
                
            </td>
            <td width="50" style="vertical-align: top; border-style: none">
                &nbsp;
            </td>
            <td style="vertical-align: top; border-style: none">
                <fieldset>
                    <legend>Roles</legend>
                    @foreach (String role in Roles.GetAllRoles())
                    {
                    <p>
                        <label for="<%= role %>">@role</label>
                        @Html.CheckBox(role, Roles.IsUserInRole(Model.UserName, role))
                    </p>
                    }
                </fieldset>
            </td>
        </tr>
        <tr>
            <td align="center" colspan="3" style="border-style: none">
                <input type="submit" value="Guardar" />
            </td>
        </tr>
    </table>
    }